<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="java.util.*"%>
<%@ page import="com.fc.util.*" %>
<%@ page import="com.fc.model.*" %>
<%@ page import="com.fc.control.*" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>store_add_do.jsp</title>
	</head>

	<body>
		<%
		request.setCharacterEncoding("UTF-8");
		int id = Integer.parseInt(request.getParameter("id"));
		//int id=ParamUtil.getInt(request,"id",0);
  		String place=ParamUtil.getString(request,"place",null);
  		
		//String place = request.getParameter("place");
  		int price0=ParamUtil.getInt(request,"price0",0);
		int price1 =ParamUtil.getInt(request,"price1",0);
  		int price2=ParamUtil.getInt(request,"price2",0);
  		
  		//StoreControl sc=new StoreControl();
  		Store store=new Store();
        //store.setId(id);
		store.setPlace(place);
		store.setPrice0(price0);
		store.setPrice1(price1);
		store.setPrice2(price2);
		//System.out.println("222");
  		if(StoreControl.updateStore(store,id))
  			{
  				%>
	<script language="javascript">
  				alert("修改成功");
  				window.location.href="store.jsp";
  				</script>
		<%} else { %>
		<script language="javascript">
  				alert("修改失败");
  				history.back(-1);
  				</script>
		<%} 
   %>
	</body>
</html>
